﻿var express=require("express");
var app=express();

app.use(express.static('public'));

app.get('/index.html',function(req,resp){
	resp.sendFile(__dirname+"/"+"index.html");
})

app.get('/process_get',function(req,resp){
	//输出json格式
	var response={
		"first_name":req.query.first_name,
		"last_name":req.query.last_name
	};
	console.log(response);
	resp.send(JSON.stringify(response));
})

var server=app.listen(8082,function(){
	
	console.log("server running at 127.0.0.1:8082");
})